var http = require("http");

http.createServer(function (request, res) {
    res.setHeader("Access-Control-Allow-Origin", "*");
    res.writeHead(200, { 'Content-Type': 'text/plain' });
    //设置允许跨域的域名，*代表允许任意域名跨域
    res.end('Hello World\n');
}).listen(12139);

console.log('Server running at http://127.0.0.1:3000/');